package com.clubs.coding.Controller;

import com.clubs.coding.Service.MakeTimeService;
import com.clubs.coding.common.ApiRestResponse;
import com.clubs.coding.model.pojo.MakeTime;
import com.clubs.coding.model.request.MakeTimeSelectReq;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.github.pagehelper.PageInfo;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.Date;
import java.util.List;

@Controller
@ResponseBody
@RequestMapping("/make")
public class MakeTimeController {

    @Autowired
    MakeTimeService makeTimeService;
    @PostMapping("/golist")

public ApiRestResponse list(@RequestBody @Valid MakeTimeSelectReq makeTimeSelectReq){

        PageInfo list = makeTimeService.list(makeTimeSelectReq);
        return ApiRestResponse.success(list);
}
}
